from math import gcd
"""
22ms 2984KB
7/18 13/20 12

"""

a=input().split()
deno_c=int(a[2])
x,y= eval(a[0]),eval(a[1])
if x>y:
    x,y=y,x

k = 1
res = []


while(k/deno_c<y):
    if k/deno_c>x and gcd(deno_c,k)==1:
        res.append(f"{k}/{deno_c}")
    k+=1
print(" ".join(res))

